package com.lovo.homework;

import com.lovo.util.MyTools;

import java.util.Random;

public class Computer extends Role {
    public void choiceFist() {

        setFist(MyTools.random(0, 2));
        switch (getFist()) {
            case 0:
                System.out.println("电脑出石头！");
                break;
            case 1:
                System.out.println("电脑出剪刀！");
                break;
            case 2:
                System.out.println("电脑出布！");
                break;
        }
    }
}
